package com.ruoyi.app.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.app.domain.AppUserExtend;
import com.ruoyi.app.mapper.AppUserExtendMapper;
import com.ruoyi.app.service.IAppUserExtendService;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 用户拓展Service业务层处理
 *
 * @author jiang
 * @date 2024-11-14
 */
@Service
public class AppUserExtendServiceImpl extends ServiceImpl<AppUserExtendMapper, AppUserExtend> implements IAppUserExtendService {
    @Autowired
    private AppUserExtendMapper appUserExtendMapper;

    /**
     * 查询用户拓展
     *
     * @param id 用户拓展主键
     * @return 用户拓展
     */
    @Override
    public AppUserExtend selectAppUserExtendById(Long id) {
        return appUserExtendMapper.selectAppUserExtendById(id);
    }

    /**
     * 查询用户拓展列表
     *
     * @param appUserExtend 用户拓展
     * @return 用户拓展
     */
    @Override
    public List<AppUserExtend> selectAppUserExtendList(AppUserExtend appUserExtend) {
        return appUserExtendMapper.selectAppUserExtendList(appUserExtend);
    }

    /**
     * 新增用户拓展
     *
     * @param appUserExtend 用户拓展
     * @return 结果
     */
    @Override
    public int insertAppUserExtend(AppUserExtend appUserExtend) {
        appUserExtend.setCreateTime(DateUtils.getNowDate());
        return appUserExtendMapper.insertAppUserExtend(appUserExtend);
    }

    /**
     * 修改用户拓展
     *
     * @param appUserExtend 用户拓展
     * @return 结果
     */
    @Override
    public int updateAppUserExtend(AppUserExtend appUserExtend) {
        appUserExtend.setUpdateTime(DateUtils.getNowDate());
        return appUserExtendMapper.updateAppUserExtend(appUserExtend);
    }

    /**
     * 批量删除用户拓展
     *
     * @param ids 需要删除的用户拓展主键
     * @return 结果
     */
    @Override
    public int deleteAppUserExtendByIds(Long[] ids) {
        return appUserExtendMapper.deleteAppUserExtendByIds(ids);
    }

    /**
     * 删除用户拓展信息
     *
     * @param id 用户拓展主键
     * @return 结果
     */
    @Override
    public int deleteAppUserExtendById(Long id) {
        return appUserExtendMapper.deleteAppUserExtendById(id);
    }
}

